# initialize boundary parameters
import numpy as np
from define_problem_space_parameters import boundary
# define logical parameters for the conditions that  will be used often 
is_cpml_xn = False
is_cpml_xp = False
is_cpml_yn = False

is_cpml_yp = False
is_cpml_zn = False
is_cpml_zp = False

is_any_side_cpml = False
if boundary["type_xn"] == 'cpml':
    is_cpml_xn = True
    n_cpml_xn = np.abs(boundary["cpml_number_of_cells_xn"])
if boundary["type_xp"] == 'cpml':
    is_cpml_xp = True
    n_cpml_xp = np.abs(boundary["cpml_number_of_cells_xp"])
if boundary["type_yn"] == 'cpml':
    is_cpml_yn = True
    n_cpml_yn = np.abs(boundary["cpml_number_of_cells_yn"])
if boundary["type_yp"] == 'cpml':
    is_cpml_yp = True
    n_cpml_yp = np.abs(boundary["cpml_number_of_cells_yp"])
if boundary["type_zn"] == 'cpml':
    is_cpml_zn = True
    n_cpml_zn = np.abs(boundary["cpml_number_of_cells_zn"])
if boundary["type_zp"] == 'cpml':
    is_cpml_zp = True
    n_cpml_zp = np.abs(boundary["cpml_number_of_cells_zp"])

is_any_side_cpml = False
if (is_cpml_xn or is_cpml_xp or is_cpml_yn \
        or is_cpml_yp or is_cpml_zn or is_cpml_zp):
    is_any_side_cpml = True

# Call CPML initialization routine if any side is CPML
if is_any_side_cpml:
    from initialize_CPML_ABC import *
